home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / printing / scriptable print simpletext / extendprintrecord.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  1.7 KB  |  73 lines

  1. /*
  2. **    File:        ExtendPrintRecord.h
  3. **
  4. **    Definitions from Technote 1161
  5. **
  6. ** Copyright 1996-1999 Apple Computer. All rights reserved.
  7. **
  8. **    You may incorporate this sample code into your applications without
  9. **    restriction, though the sample code has been provided "AS IS" and the
  10. **    responsibility for its operation is 100% yours.  However, what you are
  11. **    not permitted to do is to redistribute the source as "DSC Sample Code"
  12. **    after having made changes. If you're going to re-distribute the source,
  13. **    we require that you make it clear in the source that the code was
  14. **    descended from Apple Sample Code, but that you've made changes.
  15. */
  16.  
  17. #ifndef __EXTENDPRINTRECORD__
  18. #define __EXTENDPRINTRECORD__
  19.  
  20. #ifndef __PRINTING__
  21. #include <Printing.h>
  22. #endif
  23.  
  24. #if PRAGMA_ONCE
  25. #pragma once
  26. #endif
  27.  
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31.  
  32. #if PRAGMA_STRUCT_ALIGN
  33.     #pragma options align=mac68k
  34. #elif PRAGMA_STRUCT_PACKPUSH
  35.     #pragma pack(push, 2)
  36. #elif PRAGMA_STRUCT_PACK
  37.     #pragma pack(2)
  38. #endif
  39.  
  40. #define kExtendPrintRecordOp 18
  41.  
  42. /* 
  43. Use this structure when making the 'kExtendPrintRecOp' PrGeneral call.
  44. On entry, 'hPrint' is the handle for a standard or extended print
  45. record. If 'hPrint' is an extended print record, then nothing is
  46. done. If 'hPrint' is a standard print record, then it is extended.
  47. */
  48.  
  49. typedef struct{
  50.     short    iOpCode;
  51.     short    iError;
  52.     long    lReserved;
  53.     THPrint    hPrint;
  54. }TExtendPrintRecord;
  55.  
  56. Boolean extendPrValidate(THPrint hPrint);
  57. void extendPrDefault(THPrint hPrint);
  58. void extendPrintRecord(THPrint hPrint);
  59.  
  60. #if PRAGMA_STRUCT_ALIGN
  61.     #pragma options align=reset
  62. #elif PRAGMA_STRUCT_PACKPUSH
  63.     #pragma pack(pop)
  64. #elif PRAGMA_STRUCT_PACK
  65.     #pragma pack()
  66. #endif
  67.  
  68. #ifdef __cplusplus
  69. }
  70. #endif
  71.  
  72. #endif /* __EXTENDPRINTRECORD__ */
  73.